Operational and Goal-Independent Denotational Semantics for Prolog with Cut: Proofs
نویسنده
چکیده
This paper contains the proofs of the results of 1] not already contained there. We refer to 1] for notation. We deene a stronger ordering on trees than. We say that T2 is a blooming of T1, and we write T1 T2, if and only if T2 is obtained with a strict expansion of the divergent leaves of T1. More formally we deene: (G; ") (G; ") if not div(G) (G; ") (G; ~ t) if div(G) The interest in the blooming relation is strictly related to the notion of P-directed tree. Namely, a chain of strongly P-directed trees for G increasing w.r.t. must eventually reach every strongly P-directed tree for G. This is formalized by the lemma below: Lemma P.1. Given a program P, let fTig i0 be a sequence of strongly P-directed trees for R such that Ti Ti+1. Let T be any strongly P-directed tree for R. Then there exists j such that T Ti for every i j. Proof. The proof will be carried by induction on the height of T. Suppose T = (R; "). Since every Ti is for R, we have T Ti for every i and the thesis follows. If T = (R; ~ t) with ~ t = t1 :: :: tn, let R k be the root of t k. By deenition of tree, we have div(R). Since T0 Ti for i 1, we must have Ti = (R; t i 1 :: :: t i m) for i 1. Since both T and Ti are strongly P-directed, we have n = m and t i k is for R k for k = 1; : : : ; n. Moreover, since T1 T2 T3 we conclude that t 1 k t 2 k t 3 k for any k = 1 ft i+1 k g i0 is a sequence of strongly P-directed trees for R k such that t i+1 k t i+2 k for every i 0. But t k is a strongly P-directed tree for R k. By inductive hypothesis we conclude that for every k = 1; : : : ; n there exists an index j k such that t k t i k for all i j k. Letting j = max j k , we have T Ti for every i j. We now show that sequences (6) and (7) are formed by …
منابع مشابه
We Present an Operational Model O and a Continuation Based Denotational Model D for a Section 1 Introduction
uniform variant of Prolog, including the cut operator. The two semantical definitions make use of higher order transformations Φ and Ψ, respectively. We prove O and D equivalent in a novel way by comparing yet another pair of higher order transformations Φ ˜ and Ψ ˜ , that yield Φ and Ψ, respectively , by application of a suitable abstraction operator. In [BV] we presented both an operational a...
متن کاملContinuation Semantics for PROLOG with Cut
We present a denotational continuation semantics for Prolog with cut. First a uniform language B is studied, which captures the control flow aspects of Prolog. The denotational semantics for B is proven equivalent to a transition system based operational semantics. The congruence proof relies on the representation of the operational semantics as a chain of approximations and on a convenient ind...
متن کاملDenotational and Operational Semantics for Prolog
The semantics of Prolog programs is usually given in terms of the model theory of first order logic. However, this does not adequately characterize the computational behavior of Prolog programs. Prolog implementations typically use a sequential evaluation strategy based on the textual order of clauses and literals in a program, as well as non-logical features like ‘‘cut’’. In this work we devel...
متن کاملA Base for Achieving Semantics for Prolog with Cut for Correct Observables
Decorated tree semantics is a goal-independent denotational semantics for Prolog that deals with the control rules of Prolog and cut operator. This semantics was designed with the aim to provide a general framework for abstract analysis of generic properties of logic programs and has been specialized into computed answer (ca) semantics and call pattern (cp) semantics. In this paper we show that...
متن کاملA Denotational Semantics for Prolog
analysis is nite, which was not the case in our previous proposal [13]. The overheadneeded for reaching an improved precision essentially consists in the use of observability andkernel constraints and of their success and failure conditions.We can now consider the already mentioned paper [11]. A big di erence arises lookingfor instance at the way they handle clause composition a...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2007